package nothing.dao.hibernate;

import nothing.model.FoodStorageType;
import nothing.dao.FoodStorageTypeDao;
import org.appfuse.dao.hibernate.GenericDaoHibernate;

import java.util.List;

public class FoodStorageTypeDaoHibernate extends GenericDaoHibernate<FoodStorageType, Long> implements FoodStorageTypeDao {

    public FoodStorageTypeDaoHibernate() {
        super(FoodStorageType.class);
    }

    @SuppressWarnings("unchecked")
    public List findByFoodName(String name) {
                return getHibernateTemplate().find("from FoodStorageType fst, Food f where fst.food=f and f.name=?", name);
    }
}

